import 'package:flutter/material.dart';

class FirstPage extends StatefulWidget {
  @override
  _RouteDemoState createState() => _RouteDemoState();
}

class _RouteDemoState extends State<FirstPage> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text('第一个页面'),
      ),
      body: Center(
        child: RaisedButton(
          child: Text('跳转到第二个页面'),
          onPressed: (){
            Navigator.pushNamed(context, '/AnimationWidgetDemo');
//            Navigator.pushNamed(context, '/sec',arguments: ['新页面','新按钮']).then((data){
//              print('data is $data');
//            });
          },
        ),
      ),
    );
  }
}
